import type { AnyObject } from "@/types/category";
import request from "@/utils/request";

/* 获取分类页第一页数据 */
export const reqCategoryList = () => {
  return request.get<any, AnyObject>(`/m-revision/page/category/queryCategoriesV2`)
}

/* 获取分类页第二页数据 */
export const reqCategory2List = (categoryId: number | string) => {
  return request.get<any, AnyObject>(`/revision/category/v2/metadata/info?categoryId=${categoryId}`)
}

/* 获取分类页第二页列表数据 */
export const reqCategory2UnitList = (params: AnyObject) => {
  return request.get<any, AnyObject>(`/revision/category/v2/albums?pageNum=${params.pageNum}&pageSize=${params.pageSize}&sort=${params.sort}&categoryId=${params.categoryId}&metadataValues=${params.metadataValues}`)
}